from datetime import datetime
from functools import wraps


def decorate(*, obj_name):
    def _wraps(f):
        @wraps(f)
        def func(*args, **kwargs):

            start_time = datetime.now()
            print(f"{obj_name}\tstart_time={start_time}")

            res = f(*args, **kwargs)

            end_time = datetime.now()
            print(f"{obj_name}\tend_time={end_time}\tcost={end_time - start_time}")

            return res

        return func

    return _wraps
